package com.hollycrm.ahunicom.sheet.sales.hibernate;

/**
 * TblUserDepartmentId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TblUserDepartmentId implements java.io.Serializable {

	// Fields

	private String userId;
	private String departmentId;

	// Constructors

	/** default constructor */
	public TblUserDepartmentId() {
	}

	/** full constructor */
	public TblUserDepartmentId(String userId, String departmentId) {
		this.userId = userId;
		this.departmentId = departmentId;
	}

	// Property accessors

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getDepartmentId() {
		return this.departmentId;
	}

	public void setDepartmentId(String departmentId) {
		this.departmentId = departmentId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TblUserDepartmentId))
			return false;
		TblUserDepartmentId castOther = (TblUserDepartmentId) other;

		return ((this.getUserId() == castOther.getUserId()) || (this
				.getUserId() != null
				&& castOther.getUserId() != null && this.getUserId().equals(
				castOther.getUserId())))
				&& ((this.getDepartmentId() == castOther.getDepartmentId()) || (this
						.getDepartmentId() != null
						&& castOther.getDepartmentId() != null && this
						.getDepartmentId().equals(castOther.getDepartmentId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUserId() == null ? 0 : this.getUserId().hashCode());
		result = 37
				* result
				+ (getDepartmentId() == null ? 0 : this.getDepartmentId()
						.hashCode());
		return result;
	}

}